package com.srit.vgt.dao;

import com.srit.vgt.common.parent.ParentDao;
import com.srit.vgt.entity.MarketTran;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author Yyming
 * @version 10.0
 * Created by Yyming on 2021/1/20
 */
public interface MarketTranDao extends ParentDao<MarketTran, MarketTran.MarketTranKey> {

    @Query(nativeQuery = true, value = "select * from market_tran where marketId = ?3 and date between ?1 and ?2")
    List<MarketTran> findAllByDateIsBetweenAndMarketId(String data1, String data2, String marketId);
}
